<?php

function category_type_select($selected_value = 1)
{
	$selected = array();
	$selected[$selected_value] = 'selected';
?>
	<select name="category_type" id="category_type">
		<option <?php echo $selected[CF_TYPE_TEXTFIELD] ?> value="<?php echo CF_TYPE_TEXTFIELD ?>"><?php _e('Text Field') ?></option>
		<option <?php echo $selected[CF_TYPE_TEXTAREA] ?> value="<?php echo CF_TYPE_TEXTAREA ?>"><?php _e('Text Area') ?></option>
		<option <?php echo $selected[CF_TYPE_DROPDOWN] ?> value="<?php echo CF_TYPE_DROPDOWN ?>"><?php _e('Dropdown List') ?></option>
		<option <?php echo $selected[CF_TYPE_GALLERY] ?> value="<?php echo CF_TYPE_GALLERY ?>"><?php _e('Gallery') ?></option>
		<option <?php echo $selected[CF_TYPE_MAP] ?> value="<?php echo CF_TYPE_MAP ?>"><?php _e('Map') ?></option>
	</select>
<?php	
}

function get_type_label($value)
{
	switch ($value) {
		case CF_TYPE_TEXTFIELD:
			$label = 'Text Field';
			break;
		case CF_TYPE_TEXTAREA:
			$label = 'Text Area';
			break;
		case CF_TYPE_DROPDOWN:
			$label = 'Dropdown List';
			break;
		case CF_TYPE_GALLERY:
			$label = 'Gallery';
			break;
		case CF_TYPE_MAP:
			$label = 'Map';
			break;
		default:
			$label = '';
			break;
	}
	
	return $label;
}

?>